/*
 * @Author: wanggaoyang wgy910528@163.com
 * @Date: 2022-08-11 21:25:16
 * @LastEditors: wanggaoyang wgy910528@163.com
 * @LastEditTime: 2022-08-11 21:41:19
 * @FilePath: \shop-admin\vite.config.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import WindiCSS from 'vite-plugin-windicss'
import path from'path'
// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue(),WindiCSS()],
  server:{
    proxy:{
      '/api': {
        target: 'http://ceshi13.dishait.cn',
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/api/, '')
      },
    }
  },
  resolve:{
    alias:{
      '~':path.resolve(__dirname,"src")
    }
  }
})
